package pe.gob.sunat.proyecto.jms;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.jms.core.JmsTemplate;
import org.springframework.stereotype.Component;

@Component
public class QueueSender {
	
	private JmsTemplate jmsTemplate;
	
	@Autowired
	public QueueSender(JmsTemplate jmsTemplate){
		this.jmsTemplate = jmsTemplate;
	}
	
	public void sendMessage(String message){
		jmsTemplate.setPubSubDomain(true);
		jmsTemplate.convertAndSend("cola_request", message);
	}

}
